package com.example.serviceorder.interceptor;

import feign.InvocationContext;
import feign.ResponseInterceptor;

/**
 * 自定义天气接口的响应拦截器
 */
public class WeatherResponseInterceptor implements ResponseInterceptor {

    @Override
    public Object intercept(InvocationContext invocationContext, Chain chain) throws Exception {
        System.out.println("【天气响应拦截器】请求方法：" + invocationContext.response().request().method());
        System.out.println("【天气响应拦截器】请求地址：" + invocationContext.response().request().url());
        return chain.next(invocationContext);
    }
}
